Add the ability to get a iCalendar format feed from any calendar#349
Open
randohinn wants to merge 9 commits intoXtendify:mainfrom
Open
Add the ability to get a iCalendar format feed from any calendar#349randohinn wants to merge 9 commits intoXtendify:mainfrom
randohinn wants to merge 9 commits intoXtendify:mainfrom
Conversation
…calendar events too.
rosinghal
requested changes
Mar 20, 2023
Member
rosinghal
left a comment
There was a problem hiding this comment.
@randohinn let me start by apologising for the delay in checking. Thanks so much for submitting this PR.
| if(strpos($ics, $event->uid) == false) { | ||
| $ics .= "BEGIN:VEVENT\r\n"; | ||
| $ics .="UID:" . $event->uid . "\r\n"; | ||
| $ics .="DTSTAMP:" . $event->start_dt->format('Ymd\THis') . "\r\n"; |
Member
| $ics .= "DTSTART:" . $event->start_dt->format('Ymd\THis') . "\r\n"; | ||
| $ics .= "DTEND:" . $event->end_dt->format('Ymd\THis') . "\r\n"; | ||
| $ics.= "SUMMARY:" . format_ical_string($event->title) . "\r\n"; | ||
| $ics .= "DESCRIPTION:" . format_ical_string($event->description) . "\r\n"; |
Member
There was a problem hiding this comment.
It would nice to check if the description is present, if not we can skip adding the description.
| $content = '<strong>' . '[title]' . '</strong>'; | ||
| $content .= "\n\n"; | ||
| $content .= '[when]' . "\n"; | ||
| $content .= '[when]' . "\r\n"; |
| } | ||
| } | ||
|
|
||
| public function simcal_ics_action() { |
Member
There was a problem hiding this comment.
Please fix the formatting, a tab is missing.
|
This pull request has been marked as stale due to inactivity. It will be closed in 30 days if no further updates are made. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR adds the ability to add
?ics=trueto the end of any calendar URL and get an iCalendar formatted feed generated and returned back. This is useful as the plugin can provide this link to both single and grouped calendars, making mass-sharing of grouped calendars much easier.Welcome to feedback and/or changes needed to better structure this. So far, I have tested this on the site of JCI Estonia with a grouped calendar of 11 individual calendars and over 100 events successfully.